package com.gupt.weekly.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

/**
 * @author linzizun
 * @version 1.0
 * @date 2021/04/12 17:33
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "人员关联角色")
@TableName(value = "tb_user_role")
public class UserRole {
    @ApiModelProperty(value = "主键非空", example = "创建新用户不要传此字段，会自动生成")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @NotBlank(message = "请发送人员id")
    @ApiModelProperty(value = "人员，关联tb_user.id")
    private String user_id;

    @NotBlank(message = "请发送角色id")
    @ApiModelProperty(value = "担任角色，关联tb_role.id")
    private String role_id;
}
